# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gfbgraph
pkgver=0.2.4
pkgrel=0
pkgdesc="GFBGraph is a GLib/GObject wrapper for the Facebook API"
url="https://wiki.gnome.org/Projects/GFBGraph"
arch="all"
license="LGPL-2.1-or-later"
makedepends="gobject-introspection-dev gtk-doc glib-dev rest-dev json-glib-dev
	libsoup-dev gnome-online-accounts-dev autoconf automake libtool"
options="!check" # Need valid FB credentials to work, so let's not
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/gfbgraph/${pkgver%.*}/gfbgraph-$pkgver.tar.xz"

prepare() {
	default_prepare
	# Upstream forgot to generate these in the release tarball
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-gtk-doc
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e6d63e56f4d67b59b0abbfb9dfe3aad8b142023413246015a84078c76f631eaa6e9fa7eb5771f64156ea01e160eb07b17783059e449036b372b4bcb26751ff68  gfbgraph-0.2.4.tar.xz"
